-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): reexport less symbols in .ngfactory.ts
files
#19884
Conversation
You can preview 28ed2fd at https://pr19884-28ed2fd.ngbuilds.io/. |
28ed2fd
to
6a81fa0
Compare
You can preview 6a81fa0 at https://pr19884-6a81fa0.ngbuilds.io/. |
6a81fa0
to
4fc578b
Compare
.ngfactory.ts
files
You can preview 4fc578b at https://pr19884-4fc578b.ngbuilds.io/. |
@@ -126,9 +127,22 @@ class ToJsonSerializer extends ValueTransformer { | |||
} | |||
}); | |||
metadata = clone; | |||
} else if (isCall(metadata)) { | |||
if (!isFunctionCall(metadata) && !isMethodCallOnVariable(metadata)) { | |||
// Don't store complex calls as we won't be able to simplify them anyways lateron. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} else if (isCall(metadata)) { | ||
if (!isFunctionCall(metadata) && !isMethodCallOnVariable(metadata)) { | ||
// Don't store complex calls as we won't be able to simplify them anyways lateron. | ||
metadata = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of returning undefined
you should replace it with an {__symbolic: 'error
}` instead as this might cause a silent failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
} | ||
} else if (isContructorCall(metadata)) { | ||
// don't store `new` calls | ||
metadata = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
4fc578b
to
3b9ee40
Compare
You can preview 3b9ee40 at https://pr19884-3b9ee40.ngbuilds.io/. |
packages/compiler/src/aot/util.ts
Outdated
|
||
export function isLoweredSymbol(name: string) { | ||
return /\u0275\d+/.test(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to a const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
You can preview b5b67ec at https://pr19884-b5b67ec.ngbuilds.io/. |
* don't reexport symbols that the user already reexported * never reexport symbols that are part of arguments of non simple function calls Fixes angular#19883
b5b67ec
to
3bbecb0
Compare
You can preview 3bbecb0 at https://pr19884-3bbecb0.ngbuilds.io/. |
Note: this is green on global TAP. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #19883